/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * @fileOverview 支付平台1.0
 * 兴趣点轨迹下载业务逻辑
 * @author fengbj
 * @ date 2010-3-10 16:49:48
 */

jQuery.extend({
    showWindow : function(id , content , closeElement){
        this.elementId = "mapbar_div_show";
        this.id =id;
        this.content = content;
        this.closeElement = closeElement;
        this.show = function(){

            if($("#" + this.elementId).length >=1){

                $("#" + this.elementId).show();
            }
            else{

                var div = document.createElement('div');
                div.style.position = "absolute";
                div.style.left = (document.documentElement.clientWidth/2+document.documentElement.scrollLeft-250)+"px";
                div.style.top = (document.documentElement.clientHeight/2+document.documentElement.scrollTop-100)+"px";
                div.id = "mapbar_div_show";
                div.innerHTML = this.content;
                $(div).appendTo($("body"));
                if(typeof this.closeElement != "undefined" && this.closeElement != null){
                    $(this.closeElement).click(function(){
                        $("#mapbar_div_show").hide();

                    })
                }
               // $("#close").click(function(){alert(111111111) })

            //document.getElementById("lDiv").className="loginBox";
            }
            return this;
        };
        this.close = function(_this){

            if($("#" + _this.elementId).length >=1){
                $("#"  + _this.elementId).hidden();
            }
        }
        
        return this;
    }
})
    
    


